<p>Non-admin username and password: john.doe and jwtpass</p>
<p>Admin user: admin.admin and jwtpass</p>

<div class="form-wrapper">
  <form name="form" (ngSubmit)="f.form.valid && login()" #f="ngForm" novalidate>
    <div class="form-group" [ngClass]="{ 'has-error': f.submitted && !username.valid }">
      <input type="text" class="form-control" name="username" [(ngModel)]="model.username" #username="ngModel"
             required placeholder="Username"/>
      <div *ngIf="f.submitted && !username.valid" class="help-block">Username is required</div>
    </div>
    <div class="form-group" [ngClass]="{ 'has-error': f.submitted && !password.valid }">
      <input type="password" class="form-control" name="password" [(ngModel)]="model.password" #password="ngModel"
             required placeholder="Password"/>
      <div *ngIf="f.submitted && !password.valid" class="help-block">Password is required</div>
    </div>
    <div class="form-group">
      <button [disabled]="loading" class="btn btn-primary">Sign In</button>
    </div>
    <div *ngIf="error" class="alert alert-danger">{{error}}</div>
  </form>
</div>
